/*
 * @Author: CoderLPF
 * @Date: 2020-03-29 20:37:17
 * @LastEditTime: 2020-05-05 16:37:42
 * @LastEditors: CoderLPF
 * @Description: 
 * @FilePath: \fzx-system-fd\src\api\startitem\index.js
 */
import api from '../index';
import urls from './urls';

const header = {};

export default {
    //各类数据
    getmytasklist(data) {
        return api.get(urls.getmytasklist + data.projectId + "/" + data.businessType + "/" + data.userId, null);
    },
    getprocessinglist(data) {
        return api.get(urls.getprocessinglist + data.projectId + "/" + data.businessType + "/" + data.userId, null);
    },
    getfinishedlist(data) {
        return api.get(urls.getfinishedlist + data.projectId + "/" + data.businessType + "/" + data.userId, null);
    },
    getcomment(data) {
        return api.get(urls.getcomment + data.businessType + "/" + data.businessId, null, null);
    },

    // getflowdefinition(param) {
    //     return api.post(urls.getstage, data, null, null);
    // },

    //流程进度
    getstage(data) {
        return api.post(urls.getstage, data, null, null);
    },
    getcurrentstage(data) {
        return api.get(urls.getcurrentstage + data.executionId + "/" + data.procInstId, null, null);
    },
    getworkflow(data) {
        return api.get(urls.getworkflow + data.businessType + "/" + data.businessId, null, null);
    },

    //判断是不是第一次
    isfirsttime(data) {
        return api.post(urls.isfirsttime, data, null, null);
    },

    //流程控制
    starttask(data) {
        return api.post(urls.starttask, null, null, data);
    },
    approve(data) {
        return api.post(urls.approve, null, null, data);
    },
    disapprove(data) {
        return api.post(urls.disapprove, null, null, data);
    },

    //待办
    getTodoList(id) {
        return api.get(urls.getTodoList + id, null, null);
    },

    getRoleByRuningInfo(businessType, businessId) {
        return api.get(urls.getRoleByRuningInfo + businessType + "/" + businessId, null, null);
    }
};